home *** CD-ROM | disk | FTP | other *** search
- // $VER: fbackng.h 1.2.0 (10-12-1999)
- #define FBACKNG_H
- // AmigaOS
- #include <exec/types.h>
- #include <exec/memory.h>
- #include <exec/lists.h>
- #include <exec/nodes.h>
- #include <dos/exall.h>
- #include <dos/datetime.h>
- #include <libraries/dos.h>
- #include <proto/exec.h>
- #include <proto/dos.h>
- #include <proto/xpkmaster.h>
-
- // SAS/C
- #include <ctype.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <dos.h>
- #include <sys/dir.h>
-
- // Constants
- #define STR_BACKUPPHASE "----- Backup Phase"
- #define STR_MIRRORPHASE "----- Mirror Phase"
- #define STR_DELETEPHASE "----- Delete Phase"
- #define OUT_QUIET 0
- #define OUT_NORMAL 1
- #define OUT_DETAIL 2
- #define OUT_DEBUG 3
- #define BUF_SIZE 256000
-
- // CLI Parameter lengths
- #define LEN_PATH 256
- #define LEN_STRING 32
-
- typedef struct Option_Flags {
- int opt_validuser;
- int opt_source; // source path (from) REQ
- int opt_dest; // destination path (to) REQ
- int opt_simulate; // simulate mode
- int opt_recursive; // recursive traversing
- int opt_verbose; // verbosity level
- int opt_priority; // set priority
- int opt_compress; // enable compression
- int opt_every; // ignore archive bit = all
- int opt_touch; // modify date/timestamp on destination
- int opt_nonotes; // do not copy filenotes
- int opt_pattern; // only process files matching pattern
- int opt_log; // write to log
- int opt_before; // only files < date
- int opt_after; // only files > date
- int opt_mirror; // do mirror phase
- int opt_skip; // do not run backup phase
- int opt_delete; // run dir clean phase
- int opt_noarch; // do not set archive bit after backup
- } FLOPTS;
-
- typedef struct Option_Values {
- char val_user[LEN_PATH];
- char val_temp[LEN_PATH];
- char val_source[LEN_PATH];
- char val_dest[LEN_PATH];
- int val_verbose;
- char val_compress[LEN_STRING];
- char val_pattern[LEN_STRING];
- char val_log[LEN_PATH];
- char val_before[LEN_STRING];
- char val_after[LEN_STRING];
- } VAOPTS;
-
- extern FLOPTS optflg;
- extern VAOPTS optval;
- extern ULONG tot_files;
- extern ULONG prc_files;
- extern ULONG del_dirs;
- extern ULONG tot_direc;
- extern struct DateTime dt_Before;
- extern struct DateTime dt_After;
-
- // Prototypes
- int getopt(int argc, char **argv, char *opts);
- int GetRegisteredUser(char *, char *);
- void check_write_log(char *custom);
- // The End
-